#!/usr/bin/env python3
#coding=utf8

import importlib

class PluginsManage(object):
    plugins = set()
    def __init__(self):
        pass

    def load_plugin(self,plugin_path='./'):
        self.plugins = set()
        for folder in os.listdir(plugin_path):
            if '__' not in folder:
                self.plugins.append(folder)

    def add_plugin(self,plugin_name):
        if plugin_name not in self.plugins:
            if '__' not in plugin_name:
                self.plugins.append(plugin_name)

    def del_plugin(self,plugin_name):
        if plugin_name in self.plugins:
            if '__' not in plugin_name:
                self.plugins.pop(plugin_name)

class BasePlugin(object):
    def __init__(self):
        self.settings = dict(
            name = 'BasePlugin',
            port = 80,
            thread_num = 10,
            text = '插件说明文本'
        )

class PluginCore(object):
	pass
	